//设计医生信息表单模型
var mongoose = require("mongoose");
var Schema = mongoose.Schema;
//连接数据库
mongoose.connect("mongodb://localhost:27017/chat", {
  useNewUrlParser: true,
  useUnifiedTopology: true,
});

var MessageSchema = new Schema({
  username: String,
  content: String,
  createAt: { type: Date, default: Date.now },
});
module.exports = mongoose.model("Message", MessageSchema);
